package main

import (
	"fmt"
	"gitee.com/hardykay/AnalysisLampLog/logic"
	"os"
	"path"
	"path/filepath"
)

func main() {
	wd, err := os.Getwd()
	if err != nil {
		fmt.Println(err)
		return
	}
	wd = path.Join(wd, "Logs")
	var files []string
	err = filepath.Walk(wd, func(path string, info os.FileInfo, err error) error {
		if err != nil {
			fmt.Printf("访问路径 %q 时出错: %v\n", path, err)
			return err
		}
		// 忽略文件夹
		if !info.IsDir() {
			files = append(files, path)
		}
		return nil
	})
	logic.Run(files)
}
